<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    #outBox{
        height: 200px;
        width: 100px;
        background-color: red;
        padding: 10px;
        margin: 10px;
    }
    #innerBox{
        height: 100px;
        width: 50px;
        background-color: blue;
        padding: 20px;
        margin: 10px;
    }
</style>
<body>
    <div id="outBox">

        <div id="innerBox"></div>

    </div>

    <script>
        const outBox = document.getElementById('outBox');
        const innerBox = document.getElementById('innerBox');
        const innerBoxHeight = innerBox.getBoundingClientRect()
        const outBoxHeight = outBox.getBoundingClientRect()

        console.log(outBox,innerBox,innerBoxHeight,outBoxHeight);

    </script>

    
</body>
</html>